package cn.lijida.weiwei.favor.modules.account.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

import com.baomidou.mybatisplus.annotation.TableId;

import cn.lijida.weiwei.favor.commons.validator.AddGroup;
import cn.lijida.weiwei.favor.commons.validator.UpdateGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 账簿明细
 * </p>
 *
 * @author jobob
 * @since 2019-12-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class FavorAccountDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 关系编号
     */
    @TableId
    @NotNull(message = "详情编号不能为空", groups = UpdateGroup.class)
    private Long detailId;

    /**
     * 成员编号
     */
    private Long memberId;

    /**
     * 账簿编号
     */
    @NotNull(message = "账簿编号不能为空", groups = AddGroup.class)
    private Long accountId;

    /**
     * 宾客编号
     */
    @NotNull(message = "宾客编号不能为空", groups = AddGroup.class)
    private Long guestId;

    /**
     * 礼金
     */
    @NotNull(message = "礼金不能为空", groups = AddGroup.class)
    @DecimalMin(value = "0", message = "礼金不能小于0", groups = AddGroup.class)
    @DecimalMax(value = "100000000", message = "礼金不能大于100000000", groups = AddGroup.class)
    private BigDecimal money;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;
}
